
export const appRouter = [

    {
        path: '/mine',
        //使用多级路由时候(2级没有发现，3级以上)，这个一定不能写。否则跳转不过去。
        // component: () => import('@/views/mine/index.vue'),
        children: [
            {
                path: '',
                name: 'mine',
                component: () => import('@/views/mine/MineView.vue'),
                meta: {
                    title: "我的",
                    keepAlive: true, // 需要缓存
                },
            },
            {
                path: 'myorder',
                name: 'myorder',
                component: () => import('@/views/mine/myorder/MyOrder.vue'),
                meta: {
                    title: "我的订单",
                    keepAlive: true, // 需要缓存
                    hidetabbar: true, //隐藏
                },
            },
            {
                path: 'mylike',
                name: 'mylike',
                component: () => import('@/views/mine/mylike/MyLike.vue'),
                meta: {
                    title: "我喜欢的",
                    keepAlive: true, // 需要缓存
                    hidetabbar: true, //隐藏
                },
            },
            {
                path: 'coupons',
                name: 'coupons',
                component: () => import('@/views/mine/coupons/CouponsView.vue'),
                meta: {
                    title: "卡券",
                    keepAlive: true, // 需要缓存
                    hidetabbar: true, //隐藏
                },
            },
            {
                path: 'integral',
                name: 'integral',
                component: () => import('@/views/mine/integral/IntegralView.vue'),
                meta: {
                    title: "积分",
                    keepAlive: true, // 需要缓存
                    hidetabbar: true, //隐藏
                },
            },
            {
                path: 'adress',
                name: 'adress',
                component: () => import('@/views/mine/adress/AdressView.vue'),
                meta: {
                    title: "地址管理",
                    keepAlive: true, // 需要缓存
                    hidetabbar: true, //隐藏
                },
            },
            {
                path: 'contactus',
                name: 'contactus',
                component: () => import('@/views/mine/ContactUs.vue'),
                meta: {
                    title: "联系我们",
                    keepAlive: true, // 需要缓存
                    hidetabbar: true, //隐藏
                },
            },
            {
                path: 'account',
                // name: 'account',
                //使用多级路由时候(2级没有发现，3级以上)，这个一定不能写。否则跳转不过去
                // component: () => import('@/views/mine/account/AccountView.vue'),
                // meta: {
                //     title: "账号与安全",
                //     keepAlive: true, // 需要缓存
                //     hidetabbar: true, //隐藏
                // },
                children: [
                    {
                        path: '',
                        name: 'account',
                        component: () => import('@/views/mine/account/AccountView.vue'),
                        meta: {
                            title: "账号与安全",
                            keepAlive: true, // 需要缓存
                            hidetabbar: true, //隐藏
                        },
                    },
                    {
                        path: 'cancellation',
                        name: 'cancellation', 
                        component: () => import('@/views/mine/account/Cancellation.vue'),
                        meta: {
                            title: "注销申请",
                            keepAlive: true, // 需要缓存
                            hidetabbar: true, //隐藏
                        },
                    }
                ]
            },
            // {
            //     path: 'cancellation',
            //     name: 'cancellation', 
            //     component: () => import('@/views/mine/account/Cancellation.vue'),
            //     meta: {
            //         title: "注销申请",
            //         keepAlive: true, // 需要缓存
            //         hidetabbar: true, //隐藏
            //     },
            // }
        ]
    },
]

export const mine = [...appRouter]
